-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Switch to pipeline stream desc for dx12 pipeline creation #8377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to pipeline stream desc for dx12 pipeline creation #8377
Conversation
cwfitzgerald
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We likely can't use stream descriptors unconditionally unless we can prove that support for it goes back far enough
|
Alright, so it was the Creators Update (1703) that introduced it, we'd need to hear from mozilla if that's too new. |
|
I can probably switch this so that the pipeline descriptor gets converted into a graphics pipeline descriptor on platforms where this wouldn't work. That probably will be the best for compatibility regardless of what Mozilla wants. |
|
Discussed at today's wgpu matainers meeting. Resolution: lets use this conditionally. mapping from a single struct works fine. Discussion
|
|
This is waiting on getting refactored into its own optional file. |
ae3040d to
ac012d7
Compare
|
It's now in its own file, and falls back to standard pipeline descriptors on windows versions that don't support stream descs. Should be good to go? |
cwfitzgerald
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, basically done.
bd51b65 to
f742607
Compare
Co-authored-by: Inner Daemons <[email protected]>
f742607 to
7d496d7
Compare
cwfitzgerald
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored a bit as discussed, and this looks both provably sound and ready to land.
Head branch was pushed to by a user without write access
|
Oops, thanks |
Connections
Closes #8341
Required for #8376
Description
The
CreateGraphicsPipelineStatefunction works great for basic render pipelines, but for more advanced features such as mesh shaders (#8110) or multiview/view instancing (#8206), you must use a streaming descriptor. The streaming descriptor corresponds more or less to a vulkan pipeline descriptor with the state described in apNextchain, allowing you to use all sorts of extensions.This PR switches all pipeline creation to use this function. Mesh shaders already used it but there was no reason to use different code paths for mesh shader pipelines vs standard pipelines when 99% of the descriptor is the same.
One thing to note: if it is ever possible in some esoteric system to use the DX12 backend on a 32-bit system, this code might not function properly. It probably still would, but it might not. Not that this is a setup that any real person has of course.
Testing
Existing testing (pretty much all tests use render pipelines)
Squash or Rebase?
Squash
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.